import ratemymacclass.Professor
import ratemymacclass.Course
import ratemymacclass.Rating

class BootStrap {

    def init = { servletContext ->

        def course = new Course(title: "Structured Computer Organization",
                                department: "COMP",
                                courseNum: 240).save(failOnError: true)

        def course1 = new Course(title: "Internet Computing",
                                department: "COMP",
                                courseNum: 346).save(failOnError: true)

        def course2 = new Course(title: "Theory of Computation",
                                department: "COMP",
                                courseNum: 221).save(failOnError: true)

        def prof = new Professor(firstName: "Michael",
                                 lastName: "Schneider",
                                 department: "COMP").save(failOnError: true)

        def prof1 = new Professor(firstName: "Shilad",
                                 lastName: "Sen",
                                 department: "COMP").save(failOnError: true)

        def prof2 = new Professor(firstName: "Elizabeth",
                                 lastName: "Shoop",
                                 department: "COMP").save(failOnError: true)

    }
    def destroy = {
    }
}
